local BlizzSendChatMessage = BlizzSendChatMessage

function SendChatMessage(...)
	local stack = {}
	stack = strsplit(debugstack(2,1),"\n")
	local restrictedEnvironment=false
	for k,path in pairs(stack) do
		local addonname = select(strsplit(path,"\\"), 3)
		for k,plugin in pairs(AT2_PluginList) do --NYI: AT2_PluginList
			if (addonname==plugin) then
				restrictedEnvironment=addonname
				break
			end
		end
	end
	if (restrictedEnvironment) then
		AT2_HandleSCMRestrict(restrictedEnvironment,...) --NYI: AT2_HandleSCMRestrict
	else
		BlizzSendChatMessage(...)
	end
end
